<?php

class StylableContainer extends TraitOwner
{
	public function __construct( )
	{
		$this->Module = 'System/HTML';
		$this->Traits[] = new PHPXLoadableTrait( ); // this makes the class able to instantiate from a phpx file
		$this->Traits[] = new StylableTrait( ); // this gives the element access to CSS styling
		//$this->Traits[] = new HTMLAttributesTrait( ); // this gives the element access to basic HTML properties ( Class, ID )   
		$this->InitTraits( ); // activates the traits
		$this->InitPHPX( ); // activates the PHPXLoadableTrait
		$this->Template = 'StylableContainer.tpl';
	}
	
	public function Init( )
	{
		// @this function needs to be in place for the PHPX to create the component
		// it should function like the constructor of a 'normal' class
		$this->InitStylable( );
		//print $this->Style;
	}
	
	// this function is called from the Router when encountering a phpx file
	public function Render( )
	{
		require $this->GetTemplatePath( );
	}
}